package test.domain.environment;

import java.util.Properties;

public class MetaUser implements Environment<MetaUser> {
	private int maxCompanyCount;
	private int maxUserCount;
	private int maxRosterCount;
	private int rosterStartId;
	private int userMaxDigit;
	private String userPassword;
	private String userCreationDate;
	
	public MetaUser initialize(Properties prop) {
		// Test meta user configuration
		this.maxCompanyCount = Integer.parseInt(prop.getProperty("openfire.test.companies", "1"));
		this.maxUserCount = Integer.parseInt(prop.getProperty("openfire.test.accounts", "10"));
		this.maxRosterCount = this.maxUserCount - 1;
		this.rosterStartId = Integer.parseInt(prop.getProperty("openfire.test.roster.startid", "100000"));
		this.userMaxDigit = Integer.parseInt(prop.getProperty("openfire.test.user.maxdigit", "6"));
		this.userPassword = prop.getProperty("openfire.test.user.password", "welcome1");
		this.userCreationDate = prop.getProperty("openfire.test.user.creationdate");
		
		return this;
	}
	
	public int getMaxCompanyCount() {
		return maxCompanyCount;
	}
	public void setMaxCompanyCount(int maxCompanyCount) {
		this.maxCompanyCount = maxCompanyCount;
	}
	public int getMaxUserCount() {
		return maxUserCount;
	}
	public void setMaxUserCount(int maxUserCount) {
		this.maxUserCount = maxUserCount;
	}
	public int getMaxRosterCount() {
		return maxRosterCount;
	}
	public void setMaxRosterCount(int maxRosterCount) {
		this.maxRosterCount = maxRosterCount;
	}
	public int getRosterStartId() {
		return rosterStartId;
	}
	public void setRosterStartId(int rosterStartId) {
		this.rosterStartId = rosterStartId;
	}
	public int getUserMaxDigit() {
		return userMaxDigit;
	}
	public void setUserMaxDigit(int userMaxDigit) {
		this.userMaxDigit = userMaxDigit;
	}
	public String getUserPassword() {
		return userPassword;
	}
	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}
	public String getUserCreationDate() {
		return userCreationDate;
	}
	public void setUserCreationDate(String userCreationDate) {
		this.userCreationDate = userCreationDate;
	}
}
